const query = require('../../dbConfig/index')

const get = async (ctx,next)=>{
	const body = ctx.request.body
	let sql = `SELECT * FROM img_txt_content WHERE classId='${body.classId}'`
	const res = await query(sql)
	if(res.length>0){
		ctx.body={code:200,data:res,msg:'成功'}
		next()
	}else{
		ctx.body={code:0,data:null,msg:'失败'}
	}
}

module.exports = {
	get
}